BaseMessageListViewModel

abstract class BaseMessageListViewModel : BaseViewModel, OnPagedDataLoader<T>

Constructors

Link copied to clipboard
open fun BaseMessageListViewModel(@NonNull channelUrl: String)

Functions

Link copied to clipboard
open fun authenticate(@NonNull handler: AuthenticateHandler)
Tries to connect Sendbird Server and retrieve a channel instance.
Link copied to clipboard
open fun buildMessageList(): List<BaseMessage>
Processes a list of messages to be passed to the view.
Link copied to clipboard
open fun deleteMessage(@NonNull message: BaseMessage, @Nullable handler: OnCompleteHandler)
Deletes a message.
Link copied to clipboard
open fun getMentionSuggestion(): LiveData<MentionSuggestion>
Returns LiveData that can be observed for suggested information from mention.
Link copied to clipboard
Returns LiveData that can be observed for the list of messages.
Link copied to clipboard
abstract fun hasNext(): Boolean
Determine whether the data on the next page exists.
Link copied to clipboard
abstract fun hasPrevious(): Boolean
Determine whether the data on the previous page exists.
Link copied to clipboard
open fun loadMemberList(@Nullable startWithFilter: String)
Loads the list of members whose nickname starts with startWithFilter.
Link copied to clipboard
protected open fun onCleared()
Link copied to clipboard
open fun resendMessage(@NonNull message: BaseMessage, @Nullable handler: OnCompleteHandler)
Resends a message to the channel.
Link copied to clipboard
open fun sendFileMessage(@NonNull params: FileMessageCreateParams, @NonNull fileInfo: FileInfo)
Sends a file message to the channel.
Link copied to clipboard
open fun sendMultipleFilesMessage(@NonNull fileInfos: List<FileInfo>, @NonNull params: MultipleFilesMessageCreateParams)
Sends multiple files message to the channel.
Link copied to clipboard
open fun sendUserMessage(@NonNull params: UserMessageCreateParams)
Sends a text message to the channel.
Link copied to clipboard
open fun setTyping(isTyping: Boolean)
Sets whether the current user is typing.
Link copied to clipboard
open fun toggleReaction(    @NonNull view: View,     @NonNull message: BaseMessage,     @NonNull key: String,     @Nullable handler: OnCompleteHandler)
Adds the reaction with key if the current user doesn't add it, otherwise the reaction will be deleted
Link copied to clipboard
open fun updateUserMessage(    messageId: Long,     @NonNull params: UserMessageUpdateParams,     @Nullable handler: OnCompleteHandler)
Updates a text message with messageId.

Properties

Link copied to clipboard
open val channel: GroupChannel
Link copied to clipboard
val channelUrl: String

Inheritors

Link copied to clipboard
Link copied to clipboard